﻿using System;
using System.Data;

namespace SIS.Business
{
	/// <summary>
	/// Author: hieunv
	/// </summary>
	[Serializable]
	class Section : DataRow
	{
		/// <summary>
		/// Course ID
		/// </summary>
		public string CourseID
		{
			get
			{
				return (string)this[DataAccess.Section.COURSE_ID];
			}
			set
			{
				this[DataAccess.Section.COURSE_ID] = value;
			}
		}
		/// <summary>
		/// Section ID
		/// </summary>
		public string SectionID
		{
			get
			{
				return (string)this[DataAccess.Section.SECTION_ID];
			}
			set
			{
				this[DataAccess.Section.SECTION_ID] = value;
			}
		}
		/// <summary>
		/// Semester
		/// </summary>
		public string Semester
		{
			get
			{
				return (string)this[DataAccess.Section.SEMESTER];
			}
			set
			{
				this[DataAccess.Section.SEMESTER] = value;
			}
		}
		/// <summary>
		/// Year
		/// </summary>
		public int Year
		{
			get
			{
				return (int)this[DataAccess.Section.YEAR];
			}
			set
			{
				this[DataAccess.Section.YEAR] = value;
			}
		}
		/// <summary>
		/// Building
		/// </summary>
		public string Building
		{
			get
			{
				return (string)this[DataAccess.Section.BUILDING];
			}
			set
			{
				this[DataAccess.Section.BUILDING] = value;
			}
		}
		/// <summary>
		/// Room Number
		/// </summary>
		public string RoomNumber
		{
			get
			{
				return (string)this[DataAccess.Section.ROOM_NUMBER];
			}
			set
			{
				this[DataAccess.Section.ROOM_NUMBER] = value;
			}
		}
		/// <summary>
		/// Time Slot ID
		/// </summary>
		public string TimeSlotID
		{
			get
			{
				return (string)this[DataAccess.Section.TIME_SLOT_ID];
			}
			set
			{
				this[DataAccess.Section.TIME_SLOT_ID] = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public Section()
			: base(null)
		{

		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="builder"></param>		
		public Section(DataRowBuilder builder) : base(builder)
		{

		}
		/// <summary>
		/// 
		/// </summary>
		public bool Insert()
		{
			return (this.Table as DataAccess.Section).Insert(this);
		}
		/// <summary>
		/// 
		/// </summary>
		public bool Update()
		{
			return (this.Table as DataAccess.Section).Update(this);
		}
		/// <summary>
		/// 
		/// </summary>
		public new bool Delete()
		{
			return (this.Table as DataAccess.Section).Delete(this);
		}
	}
}
